//
//  ViewController.m
//  Design Patterns
//
//  Created by 王王 on 2016/12/10.
//  Copyright © 2016年 ying. All rights reserved.
//

#import "ViewController.h"
#import "WYXNormalDuck.h"
#import "WYXRubberDuck.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    WYXNormalDuck *normalDk = [[WYXNormalDuck alloc] init];
    [normalDk swim];
    [normalDk adorable];
    [normalDk performFlyBehavior];
    [normalDk performQuackBehavior];
    
    [NSThread sleepForTimeInterval:1.0f];
    NSLog(@"---------------------------");
    
    WYXRubberDuck *rubberDk = [[WYXRubberDuck alloc] init];
    [rubberDk swim];
    [rubberDk adorable];
    [rubberDk performFlyBehavior];
    [rubberDk performQuackBehavior];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
